//package com.zmn.plat.admin.controller.oneprice;
//
//import java.util.List;
//
//import com.zmn.common.dto2.ResponseDTO;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.zmn.common.constant.GlobalConsts;
//import com.zmn.common.dto.StatusDTO;
//import com.zmn.common.utils.date.DateUtil;
//import com.zmn.common.utils.string.StringUtil;
//import com.zmn.mcc.cas.model.LoginStaff;
//import com.zmn.plat.model.entity.oneprice.ServCityPriceAddEditVO;
//
///**
// * 城市配置一口价
// *
// * @author xiangjunming
// * @since 2019/07/04 11:04:51
// */
//@Controller
//@RequestMapping("/oneprice/city")
//public class ServCityPriceModifyController extends ChannelPriceBaseController {
//
//    @RequestMapping(value = "addEdit")
//    @ResponseBody
//    @RequiresPermissions("/oneprice/city/addEdit.action")
//    public ResponseDTO addEdit(@RequestBody ServCityPriceAddEditVO vo) {
//        LoginStaff mcStaff = getMcStaff();
//        vo.setOperatorName(mcStaff.getRealName());
//        vo.setOperatorId(mcStaff.getStaffId());
//        servCityPriceBService.addEdit(vo);
//        return ResponseDTO.success(true, GlobalConsts.SUCCESS_MSG);
//    }
//
//    @RequestMapping(value = "del")
//    @ResponseBody
//    @RequiresPermissions("/oneprice/city/del.action")
//    public ResponseDTO del(Integer relationId) {
//        if (servCityPriceService.findByKey(relationId) != null) {
//            servCityPriceService.deleteByKey(relationId);
//        }
//        return ResponseDTO.success(true, GlobalConsts.SUCCESS_MSG);
//    }
//
//    /**
//     * 启用/停用
//     *
//     * @param ids
//     *            the ids
//     * @param status
//     *            the status
//     * @return the result dto
//     * @author xiangjunming
//     * @since 2019/12/09
//     */
//    @RequestMapping(value = "modifyStatus")
//    @RequiresPermissions("/oneprice/city/modifyStatus.action")
//    @ResponseBody
//    public ResponseDTO updateStatus(String ids, int status) {
//        if (StringUtil.isBlank(ids)) {
//            return ResponseDTO.fail("请选择至少一条数据！");
//        }
//        List<Integer> channelPriceIds = StringUtil.convertStrsToList(ids);
//        StatusDTO dto = new StatusDTO();
//        dto.setIds(channelPriceIds);
//        dto.setStatus(status);
//        dto.setUpdater(getMcStaff().getRealName());
//        dto.setUpdateTime(DateUtil.getNow());
//        servCityPriceService.updateStatusBatch(dto);
//
//        return ResponseDTO.success(true,"操作成功！");
//    }
//}
